package com.sh.config;

import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.stereotype.Component;

/**
 * @ClassName ConfigBean
 * @Description TODO
 * @Author yaoqiang
 * @Date 2020/10/27 14:40
 * @Version 1.0
 */
@Component
@EnableJms
public class ConfigBean {
    @Value("${myTopic}")
    private String myTopic;

    @Bean
    public ActiveMQTopic topic(){
        return  new ActiveMQTopic(myTopic);
    }
}
